<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="pure-min.css">
        <title></title>
    </head>
    <body>
        <?php
        include('config.php');
        $idgame = trim($_POST['idgame']);
        $note = trim($_POST['note']);
//        echo $idgame;
//        echo $note;
//        echo strlen($idgame);
//        echo strlen($note);
        $sql = "UPDATE game  SET note = '$note' WHERE idgame='$idgame'";
//        echo $sql;
        $result = mysql_query($sql);
        if ($result) {
            echo '<h1>Aggiornamento effettuato</h1>';
        } else {
            echo '<h1>Aggiornamento NON effettuato</h1>';
        }
        ?>
        <div>
            <style scoped>

                .pure-button-success,
                .pure-button-error,
                .pure-button-warning,
                .pure-button-secondary {
                    color: white;
                    border-radius: 4px;
                    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
                }

                .pure-button-success {
                    background: rgb(28, 184, 65); /* this is a green */
                }

                .pure-button-error {
                    background: rgb(202, 60, 60); /* this is a maroon */
                    font-size: 110%;
                }

                .pure-button-warning {
                    background: rgb(223, 117, 20); /* this is an orange */
                }

                .pure-button-secondary {
                    background: rgb(66, 184, 221); /* this is a light blue */
                }

            </style>
        </div>        

        <div class="pure-g">
            <div class="pure-u-1-3"></div>
            <div class="pure-u-1-3">         
                <form action="welcome.php" method="post">              
                    <input type="submit" value="RITORNA" class="pure-button pure-button-primary"/><br />
                </form>        
            </div>
            <div class="pure-u-1-3">         
                <form action="logout.php" method="post">              
                    <input type="submit" value="ESCI" class="pure-button pure-button-error"/><br />
                </form>
            </div>


    </body>
</html>
